﻿@model DynamicForm.Models.ListModel

@{
    ViewBag.Title = "List";
}

<h2>List</h2>
<table style="width:100%">
    <tr>
        @foreach (ListPageField listField in Model.PageColumns)
	    {
		     <th>
                @listField.Header
            </th>
	    }
        <th></th>
    </tr>

@foreach (System.Data.DataRow dataRow in Model.RecordTable.Rows) {
    <tr>
        @foreach (ListPageField listField in Model.PageColumns)
	    {
		     <th>
                @dataRow[listField.Name].ToString()
            </th>
	    }
        <td>
           @* @Html.ActionLink("Edit", "Edit", new { /* id=item.PrimaryKey */ }) |
            @Html.ActionLink("Details", "Details", new { /* id=item.PrimaryKey */ }) |
            @Html.ActionLink("Delete", "Delete", new { /* id=item.PrimaryKey */ })*@
        </td>
    </tr>
}

</table>